/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package system.accounts.master.accountsopeningbalance;

/**
 *
 * @author Roshan
 */
public class GUIAccountsOpeningBalance extends javax.swing.JPanel {

    /**
     * Creates new form accountsopeningbalance
     */
    public GUIAccountsOpeningBalance() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        txtConsolidatedCredit = new javax.swing.JFormattedTextField();
        txtTotalCredit = new javax.swing.JFormattedTextField();
        txtTotalDebit = new javax.swing.JFormattedTextField();
        txtConsolidatedDebit = new javax.swing.JFormattedTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblOpeningBalance = new javax.swing.JTable();

        txtConsolidatedCredit.setBorder(javax.swing.BorderFactory.createBevelBorder(1));
        txtConsolidatedCredit.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        txtConsolidatedCredit.setBounds(270, 20, 120, 20);
        jLayeredPane1.add(txtConsolidatedCredit, javax.swing.JLayeredPane.DEFAULT_LAYER);

        txtTotalCredit.setBorder(javax.swing.BorderFactory.createBevelBorder(1));
        txtTotalCredit.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        txtTotalCredit.setBounds(270, 0, 120, 20);
        jLayeredPane1.add(txtTotalCredit, javax.swing.JLayeredPane.DEFAULT_LAYER);

        txtTotalDebit.setBorder(javax.swing.BorderFactory.createBevelBorder(1));
        txtTotalDebit.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        txtTotalDebit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTotalDebitActionPerformed(evt);
            }
        });
        txtTotalDebit.setBounds(150, 0, 120, 20);
        jLayeredPane1.add(txtTotalDebit, javax.swing.JLayeredPane.DEFAULT_LAYER);

        txtConsolidatedDebit.setBorder(javax.swing.BorderFactory.createBevelBorder(1));
        txtConsolidatedDebit.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0.00"))));
        txtConsolidatedDebit.setBounds(150, 20, 120, 20);
        jLayeredPane1.add(txtConsolidatedDebit, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Total(Consolidated)");
        jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLabel3.setBounds(0, 20, 160, 20);
        jLayeredPane1.add(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("Total");
        jLabel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLabel4.setBounds(0, 0, 160, 20);
        jLayeredPane1.add(jLabel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        tblOpeningBalance.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "", "Code", "Account Name", "Debit", "Credit"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblOpeningBalance.setGridColor(new java.awt.Color(204, 204, 204));
        jScrollPane2.setViewportView(tblOpeningBalance);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 427, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 701, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 305, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void txtTotalDebitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTotalDebitActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtTotalDebitActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable tblOpeningBalance;
    private javax.swing.JFormattedTextField txtConsolidatedCredit;
    private javax.swing.JFormattedTextField txtConsolidatedDebit;
    private javax.swing.JFormattedTextField txtTotalCredit;
    private javax.swing.JFormattedTextField txtTotalDebit;
    // End of variables declaration//GEN-END:variables
}
